package cn.wellwan.mybatis;

import cn.wellwan.mybatis.dao.UserDao;
import cn.wellwan.mybatis.entity.User;
import cn.wellwan.mybatis.utils.SqlSessionFactoryUtil;
import org.apache.ibatis.session.SqlSession;

import java.util.List;

/**
 * creator: maokai
 * on: 2018/3/6
 * description:
 */
public class WellanAppMain {
    public static void main (String[] args) {
        SqlSession sqlSession = SqlSessionFactoryUtil.openSqlSession();
        UserDao mapper = sqlSession.getMapper(UserDao.class);
        List<User> users = mapper.selectUserList();
        User user = mapper.selectByPrimaryKey(2863);

    }
}
